package com.mmall.concurrency.example.immutable;

import java.util.Map;
import com.google.common.collect.Maps;
import lombok.extern.slf4j.Slf4j;

/**
 * <p>Descriptions...
 *
 * @author Diamon.Cheng
 * @date 2019/12/6.
 */
@Slf4j
public class ImmutableExample_1 {
    
    private final static   Integer a = 1;
    private final static   String  b = "2";
    private final static Map<Integer, Integer> map = Maps.newHashMap();
    
    
    static {
        
        map.put(1,2);
        map.put(3,4);
        map.put(3,6);
    }
    
    public static void main(String[] args) {
//        a = 2;
//        b = "3";
//        map = Maps.newHashMap();
        //值可以修改，不可以被引用
        map.put(1, 3);
        log.info("{}", map.get(1));
    }
    
    private void test(final int a) {
//        a = 1;
    }
}
